package com.example.hehao.exam;

import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        startActivity(new Intent(this,HuanYingActivity.class));

        SharedPreferences sp = getSharedPreferences("sp",MODE_APPEND);
        boolean flag = sp.getBoolean("first",false);
        if (flag){
            startActivity(new Intent(this,ZhuActivity.class));
        }else {
            startActivity(new Intent(this,HuanYingActivity.class));
        }
        finish();
    }
}
